SetDirectory["C:\\drorbn\\AcademicPensieve\\2010-08"];
<< KnotTheory`
<< pA.m

pA[pd_PD] := Module[
{cd, res, vars},
cd = CircuitDiagram @@ (pd /. x_X :> If[PositiveQ[x], Xp@@x, Xm@@x]);
cd =cd /. {
Xp[i_,1,k_,l_] :> Xp[i,0,k,l],
Xp[i_,j_,1,l_] :> Xp[i,j,0,l],
Xm[i_,j_,1,l_] :> Xm[i,j,0,l],
Xm[i_,j_,k_,1] :> Xm[i,j,k,0]
};
res=Last[pA[cd]] /. {W[i_] :> i};
vars = Union[Cases[res, t[i_] :> i, Infinity]];
res /. Thread[(t/@ vars) -> (Array[t, {Length[vars]}])]
];
pA[other_] := pA[PD[other]]

pA[Knot[3,1]]

Alexander[Knot[3,1]][t[1]]

Test[K_Knot] := (K -> Simplify[pA[K] / Alexander[K][t[1]]])

Test[Knot[3,1]]

Test /@ AllKnots[{3,10}]

pA[L=Link["L8a21"]]

Skeleton[L]

MultivariableAlexander[L][t]

Test[L_Link] := (L -> Simplify[Product[Sqrt[t[i]], {i, Length[Skeleton[L]]}]*pA[L] / (1-t[1])/MultivariableAlexander[L][t]])

Test[L]

Print /@ (Test /@ AllLinks[{2,8}]);

L=Link[8,Alternating,20];
{mva1, mva2} = Expand[
{pA[L], mva2=Product[Sqrt[t[i]], {i, Length[Skeleton[L]]}]*(1-t[1])*MultivariableAlexander[L][t]}
]

Simplify[(mva1 /. {t[2]->t[3], t[3]->t[2]})/mva2]

L=Link[8,NonAlternating,6];
{mva1, mva2} = Expand[
{pA[L], mva2=Product[Sqrt[t[i]], {i, Length[Skeleton[L]]}]*(1-t[1])*MultivariableAlexander[L][t]}
]

Simplify[(mva1 /. {t[2]->t[3], t[3]->t[2]})/mva2]